home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
FredFish PD 314.adf
/
Zc
/
zcsrc.lzh
/
IOLib
/
stdio
/
sprintf.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-11-09
|
508b
|
34 lines
#include <stdarg.h>
static unsigned int sputc(c, s)
char c, **s;
{
return(*(*s)++ = c);
}
sprintf(buf, fmt, arg)
char *buf;
char *fmt;
int arg;
{
register int n;
register char *p = buf;
n = _printf(&buf, sputc, fmt, &arg);
p[n] = '\0'; /* always tie of the string */
return(n);
}
vsprintf(buf, fmt, args)
char *buf;
char *fmt;
va_list args;
{
register int n;
register char *p = buf;
n = _printf(&buf, sputc, fmt, args);
p[n] = '\0'; /* always tie of the string */
return(n);
}